# def programm_store():
#     global n,l,file_len
#     file_len.sort()
#     temp_len = 0
#     result_num = 0
#     for i in range(n):
#         if temp_len + file_len[i]<= l:
#             temp_len += file_len[i]
#             result_num += 1
#     return result_num

def programm_store():
    global n,s,s_time
    s_time.sort()
    time=[0]*n
    sum_time=[0]*n
    i,j=0,0
    while i<n:
        time[j]+= s_time[i]
        sum_time[j]+=time[j]
        i+=1
        j+=1
        if j==s:
            j=0
    k,t=0,0
    while k<n:
        t+=sum_time[k]
        k+=1
    return t//n